package cn.com.huzo.model.entities.purchase;

import huzofw.model.entities.BaseEntity;
import huzofw.model.entities.IAggregateRoot;
import java.io.Serializable;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;

/**
 * 采购订单-引入的补料单主表实体类
 * <p>
 * @author 吴旭
 */
public class PoLinesMrpFeedingEntity extends BaseEntity implements Serializable, IAggregateRoot {

    private static final long serialVersionUID = 6179125524358144249L;
    private String LinesId;
    private Long HeaderId;
    private Long MrpFeedingHeaderId;      // 补料单Id
    private String BillNo;                // 补料单号
    private String FeedingTypeName;       // 补料类型（1、库存订料 2、生产补料 3、后勤用料）

    public String getLinesId() {
        return LinesId;
    }

    public Long getHeaderId() {
        return HeaderId;
    }

    public Long getMrpFeedingHeaderId() {
        return MrpFeedingHeaderId;
    }

    public String getBillNo() {
        return BillNo;
    }

    public String getFeedingTypeName() {
        return FeedingTypeName;
    }

    public void setLinesId(String LinesId) {
        this.LinesId = LinesId;
    }

    public void setHeaderId(Long HeaderId) {
        this.HeaderId = HeaderId;
    }

    public void setMrpFeedingHeaderId(Long MrpFeedingHeaderId) {
        this.MrpFeedingHeaderId = MrpFeedingHeaderId;
    }

    public void setBillNo(String BillNo) {
        this.BillNo = BillNo;
    }

    public void setFeedingTypeName(String FeedingTypeName) {
        this.FeedingTypeName = FeedingTypeName;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof PoLinesMrpFeedingEntity)) {
            return false;
        }

        final PoLinesMrpFeedingEntity that = (PoLinesMrpFeedingEntity) o;

        return new EqualsBuilder()
                .append(this.getLinesId(), that.getLinesId())
                .isEquals();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int hashCode() {
        int result = 17;
        result = 31 * result + getLinesId().hashCode();

        return result;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
